home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap20 / lst20-2.asp < prev    next >
Encoding:
Text File  |  1997-09-03  |  794 b   |  36 lines

  1. <html>
  2.  
  3. <head>
  4. <title>Submit Changes</title>
  5. </head>
  6.  
  7. <body>
  8. <%set conn = server.createobject("ADODB.connection")
  9. conn.open "DSN=Cards"
  10.  
  11. set rs = Server.createobject("ADODB.recordset")
  12. rs.open "Select * from Cards where CardID = " + request("CardID"), conn, 1, 2, 1
  13.  
  14. rs("Year") = request("Year")
  15. rs("Issuer") = request("Issuer") 
  16. rs("SetName") = request("SetName")
  17. rs("CardNumber") = request("CardNumber")
  18. rs("Description") = request("Description") 
  19. rs("Grade") = request("Grade")
  20. rs("Value") = request("Value") 
  21.  
  22. on error resume next
  23. rs.Update
  24.  
  25. if err then %>
  26.  
  27. <h2 align="center">An error occured updating the database:</h2>
  28.  
  29. <h3 align="center"><%= err.description %></h3>
  30. <% else %>
  31.  
  32. <h2 align="center">Updates successful!</h2>
  33. <% end if %>
  34. </body>
  35. </html>
  36.